//
//  DynamicServer.h
//  WeCommunity
//
//  Created by mac on 2017/6/21.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import <Foundation/Foundation.h>
#include "DynamicModel.h"
#include "PostDynamicModel.h"




@interface DynamicServer : NSObject

+(DynamicServer *)shared;

#pragma mark - 发布动态
-(void)postDynamicWithModel:(PostDynamicModel *)model
                   complete:(void(^)(BOOL success, NSString *error))complete;

#pragma mark - 获取动态列表
-(void)loadDynamicDataWithDataType:(NSInteger)type
                          loadDate:(NSDate *)loadDate
                         loadCount:(NSInteger)loadCount
                          complete:(void(^)(BOOL success, NSString *error, NSArray *dataArray))complete;

#pragma mark - 点赞
-(void)likeOrUnLikeDataWithDynamic:(DynamicModel *)model
                          complete:(void(^)(BOOL success, NSString *error, DynamicModel *model))complete;

#pragma mark - 查找我赞过的内容
-(void)loadMyselfLikeDynamicWithLoadDate:(NSDate *)loadDate
                                loadCount:(NSInteger)loadCount
                                 complete:(void(^)(BOOL success, NSString *error, NSArray *dataArray))complete;


#pragma mark - 查找某人的动态
-(void)loadSomeOneDynamicDataWithContactId:(NSString *)contactId
                                 loadDate:(NSDate *)loadDate
                                loadCount:(NSInteger)loadCount
                                 complete:(void(^)(BOOL success, NSString *error, NSArray *dataArray))complete;

#pragma mark - 查询某一动态数据
-(void)findDynamicDataWithObjectId:(NSString *)objectId
                       complete:(void(^)(BOOL success,NSString *error, DynamicModel * resultModel))complete;

#pragma mark - 删除数据
-(void)deleteDynamicWithObjectId:(NSString *)objectId
                        complete:(void(^)(BOOL success,NSString *error))complete;

#pragma mark - 批量删除数据
-(void)deleteDynamicWithObjects:(NSArray *)objects
                       complete:(void(^)(BOOL success,NSString *error))complete;

#pragma mark - 举报
-(void)reportDynamicToAdmin:(DynamicModel *)model
                   complete:(void(^)(BOOL success, NSString *error, DynamicModel *model))complete;

#pragma mark - 管理员获取被举报的动态
-(void)adminLoadDynamicDataWithDate:(NSDate *)loadDate
                          loadCount:(NSInteger)loadCount
                           complete:(void(^)(BOOL success, NSString * error, NSArray *dataArray))complete;

#pragma mark - 删除被举报的数据
-(void)deleteBeenReportedDynamicWithObjectId:(NSString *)objectId
                        complete:(void(^)(BOOL success,NSString *error))complete;

@end
